(function(angular) {

    var app = angular.module('moviecat', [
        'moviecat.details',
        'moviecat.home_page',
        'moviecat.movie_list',
        'moviecat.auto-active',
    ]);
    app.controller('mainController', ['$scope', '$location', function($scope, $location) {
        $scope.query = '';
        $scope.search = function() {
            // 改变的url中的锚点，不用再去发请求.
            $location.url('/search/?q=' + $scope.query);
        }
    }]);
})(angular);